


function peizhi() {
    //1.设置body高度等于window高度
    var height = window.innerHeight;

    document.body.style.height = height + "px";
    document.body.style.backgroundColor = "red";


    //2. 设置content块等于body的高度减去一头一尾的高度
    var content_height = 0;

    content_height = height - 100 - 100;

    var contentDom = document.querySelector(".content");
    contentDom.style.height = content_height + "px";
}

window.onload = function () {
    peizhi()

}
window.onresize = function () {
    peizhi()
}